<script setup lang="ts">

import {HxqDetailLie,HxqDetailImage} from 'vue-mobile-hxq'
import imgs from 'assets/images/logo.png'
import {reactive,ref} from 'vue';
type listInfo={
    name:string,
    sex:string,
    info:string,
    age:number | null,
    img:string[]
}
interface Info{
    val:{
        info:listInfo,
        obj?:listInfo[]
    }
}
const active = ref(0);
//模拟获取到数据
const detail=reactive<Info>({
    val:{
        info:{
            name:'',
            sex:'',
            info:'',
            age:null,
            img:[]
        }
    }
})

//赋值
detail.val={
    info:{
        name:'啊啊啊',
        sex:'搜索',
        info:'少时诵诗书所三四十所所所所所所所所所所所所所所所所所所所所所',
        age:22,
        img:[imgs,imgs,imgs,imgs],
    },
    obj:[
        {
            name:'啊啊啊',
            sex:'搜索',
            info:'少时诵诗书所三四十所所所所所所所所所所所所所所所所所所所所所',
            age:22,
            img:[imgs,imgs,imgs,imgs],
        },
        {
            name:'222',
            sex:'搜索',
            info:'少时诵诗书所三四十所所所所所所所所所所所所所所所所所所所所所',
            age:22,
            img:[imgs,imgs,imgs],
        }
    ]
}
const {name,sex,info,img}=detail.val.info;
</script>

<template>
  <header>
    <div class="padding_15">
        <div class="public-detail-box padding_bot_0">
            <hxq-detail-lie name="啊啊啊啊2" :value="name"/>
            <hxq-detail-lie name="商铺名称" :value="sex"/>
            <hxq-detail-lie name="店铺信息" :value="info"/>
            <hxq-detail-image name="店铺图片" :value="img"  />
                
            
        </div>
        <div class="public_tab_box"> 
            <van-tabs v-model:active="active">
                <div class="con"> 
                    <van-tab :title="itme.name" v-for="(itme, index) in detail.val.obj" :key="index">
                        <hxq-detail-lie name="啊啊啊啊" :value="itme.name"/>
                        <hxq-detail-lie name="商铺名称" :value="itme.sex"/>
                        <hxq-detail-lie name="店铺信息" :value="itme.info"/>
                        <hxq-detail-image name="店铺图片" :value="itme.img"  />
                    </van-tab>
                   
                </div>
        
            </van-tabs>
        </div>

 
    </div>
    <pre style="border:1px solid red">
            <code class="language-js line-numbers" >
                let msg = "这是一段代码演示"
                console.log(msg)
            </code>
        </pre>
        <pre style="border:1px solid red" >
        
          <code id="code-2" class="language-markup line-numbers" style="text-align:left">
            &lt;a-sub-menu key="sub3">
              &lt;template #title>
                &lt;span>
                  &lt;notification-outlined />
                  PC端文档
                &lt;/span>
              &lt;/template>
              &lt;a-menu-item key="9">option9&lt;/a-menu-item>
              &lt;a-menu-item key="10">option10&lt;/a-menu-item>
              &lt;a-menu-item key="11">option11&lt;/a-menu-item>
              &lt;a-menu-item key="12">option12&lt;/a-menu-item>
            &lt;/a-sub-menu>
          </code>
            
        </pre>

 
  </header>


</template>

<style scoped>
header {
  line-height: 1.5;
  max-height: 100vh;
}

.logo {
  display: block;
  margin: 0 auto 2rem;
}

nav {
  width: 100%;
  font-size: 12px;
  text-align: center;
  margin-top: 2rem;
}

nav a.router-link-exact-active {
  color: var(--color-text);
}

nav a.router-link-exact-active:hover {
  background-color: transparent;
}

nav a {
  display: inline-block;
  padding: 0 1rem;
  border-left: 1px solid var(--color-border);
}

nav a:first-of-type {
  border: 0;
}

@media (min-width: 1024px) {
  header {
    display: flex;
    place-items: center;
    padding-right: calc(var(--section-gap) / 2);
  }

  .logo {
    margin: 0 2rem 0 0;
  }

  header .wrapper {
    display: flex;
    place-items: flex-start;
    flex-wrap: wrap;
  }

  nav {
    text-align: left;
    margin-left: -1rem;
    font-size: 1rem;

    padding: 1rem 0;
    margin-top: 1rem;
  }
}
</style>
